package com.cims.action.land;

import com.cims.action.BaseAction;
import com.cims.bo.land.LandBO;
import com.cims.bo.land.LandBOImpl;
import com.cims.common.vo.Customer;
import com.cims.common.vo.Land;

public class LandAction extends BaseAction{

	/** serialVersionUID */
	private static final long	serialVersionUID	= 1L;

	public LandBO				bo					= new LandBOImpl();

	public String				code;

	public Land					land;

	public Customer				owner;

	public boolean				isPurchased			= false;

	public String ajaxGetLandInfo(){
		try{
			land = bo.findLindById(Integer.parseInt(code));
			if(land != null){
				isPurchased = true;
				owner = bo.findLandOwner(land.getItem().getItemId());
				return SUCCESS;
			}else{
				return ERROR;
			}
		}catch(Exception ex){
			return ERROR;
		}
	}
}
